home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.36
/
includespcq
/
view.i
< prev
next >
Wrap
Text File
|
1994-09-17
|
5KB
|
181 lines
{
View.i for PCQ Pascal
}
{$I "Include:Graphics/GFX.i"}
{$I "Include:Graphics/Copper.i"}
{$I "Include:Graphics/GFXNodes.i"}
{$I "Include:Graphics/Monitor.i"}
Type
RasInfo = record { used by callers to and InitDspC() }
Next : ^RasInfo; { used for dualpf }
BitMap : BitMapPtr;
RxOffset,
RyOffset : Short; { scroll offsets in this BitMap }
end;
RasInfoPtr = ^RasInfo;
View = record
v_ViewPort : Address; { ViewPortPtr }
LOFCprList : cprlistptr; { used for interlaced and noninterlaced }
SHFCprList : cprlistptr; { only used during interlace }
DyOffset,
DxOffset : Short; { for complete View positioning }
{ offsets are +- adjustments to standard #s }
Modes : Short; { such as INTERLACE, GENLOC }
end;
ViewPtr = ^View;
{ these structures are obtained via GfxNew }
{ and disposed by GfxFree }
Type
ViewExtra = Record
n : ExtendedNode;
ve_View : View; { backwards link } { view in C-Includes }
Monitor : MonitorSpecPtr; { monitors for this view }
END;
ViewExtraPtr = ^ViewExtra;
ViewPort = record
Next : ^ViewPort;
ColorMap : Address; { table of colors for this viewport } { ColorMapPtr }
{ if this is nil, MakeVPort assumes default values }
DspIns : CopListPtr; { user by MakeView() }
SprIns : CopListPtr; { used by sprite stuff }
ClrIns : CopListPtr; { used by sprite stuff }
UCopIns : UCopListPtr; { User copper list }
DWidth,
DHeight : Short;
DxOffset,
DyOffset : Short;
Modes : Short;
SpritePriorities : Byte; { used by makevp }
reserved : Byte;
RasInfo : RasInfoPtr;
end;
ViewPortPtr = ^ViewPort;
{ this structure is obtained via GfxNew }
{ and disposed by GfxFree }
ViewPortExtra = Record
n : ExtendedNode;
vpe_ViewPort : ViewPortPtr; { backwards link } { ViewPort in C-Includes }
DisplayClip : Rectangle; { makevp display clipping information }
END;
ViewPortExtraPtr = ^ViewPortExtra;
ColorMap = record
Flags : Byte;
CType : Byte; { This is "Type" in C includes }
Count : Short;
ColorTable : Address;
cm_vpe : ViewPortExtraPtr;
TransparencyBits : Address;
TransparencyPlane,
reserved1 : Byte;
reserved2 : Short;
cm_vp : Address; { ViewPortPtr }
NormalDisplayInfo,
CoerceDisplayInfo : Address; { in C-Includes APTR }
cm_batch_items : Address;
VPModeID : Integer;
end;
ColorMapPtr = ^ColorMap;
{ if Type == 0 then ColorMap is V1.2/V1.3 compatible }
{ if Type != 0 then ColorMap is V36 compatible }
CONST
COLORMAP_TYPE_V1_2 = $00;
COLORMAP_TYPE_V1_4 = $01;
COLORMAP_TYPE_V36 = COLORMAP_TYPE_V1_4; { use this definition }
{ Flags variable }
COLORMAP_TRANSPARENCY = $01;
COLORPLANE_TRANSPARENCY = $02;
BORDER_BLANKING = $04;
BORDER_NOTRANSPARENCY = $08;
VIDEOCONTROL_BATCH = $10;
USER_COPPER_CLIP = $20;
CONST
EXTEND_VSTRUCT = $1000; { unused bit in Modes field of View }
{ defines used for Modes in IVPargs }
CONST
GENLOCK_VIDEO = $0002;
LACE = $0004;
SUPERHIRES = $0020;
PFBA = $0040;
EXTRA_HALFBRITE= $0080;
GENLOCK_AUDIO = $0100;
DUALPF = $0400;
HAM = $0800;
EXTENDED_MODE = $1000;
VP_HIDE = $2000;
SPRITES = $4000;
HIRES = $8000;
VPF_A2024 = $40;
VPF_AGNUS = $20;
VPF_TENHZ = $20;
Procedure FreeColorMap(colormap : ColorMapPtr);
External;
Procedure FreeVPortCopLists(vp : ViewPortPtr);
External;
Function GetColorMap(entries : Integer) : ColorMapPtr;
External;
Function GetRGB4(colomap : ColorMapPtr; entry : Integer) : Integer;
External;
Procedure InitView(view : ViewPtr);
External;
Procedure InitVPort(vp : ViewPortPtr);
External;
Procedure LoadRGB4(vp : ViewPortPtr; colors : Address; count : Short);
External;
Procedure LoadView(view : ViewPtr);
External;
Procedure MakeVPort(view : ViewPtr; viewport : ViewPortPtr);
External;
Procedure MrgCop(view : ViewPtr);
External;
Procedure ScrollVPort(vp : ViewPortPtr);
External;
Procedure SetRGB4(vp : ViewPortPtr; n : Short; r, g, b : Byte);
External;
Procedure SetRGB4CM(cm : ColorMapPtr; n : Short; r, g, b : Byte);
External;
Function VBeamPos : Integer;
External;
Procedure WaitBOVP(vp : ViewPortPtr);
External;
Procedure WaitTOF;
External;